package com.getpebble.android.framework.protocol.outbound;

import com.getpebble.android.framework.protocol.EndpointId;
import com.getpebble.android.framework.util.ByteUtils;

public class PblOutboundMusicNowPlayingMessage extends PblOutboundMessage {
    private String mAlbum;
    private String mArtist;
    private String mTitle;

    public PblOutboundMusicNowPlayingMessage(String artist, String album, String title) {
        super(EndpointId.MUSIC_CONTROL);
        this.mArtist = artist;
        this.mAlbum = album;
        this.mTitle = title;
    }

    public synchronized byte[] getBytes() {
        if (!areBytesCached()) {
            addBytes(Byte.valueOf((byte) 16));
            ByteUtils.writePascalString(this, this.mArtist, 29);
            ByteUtils.writePascalString(this, this.mAlbum, 29);
            ByteUtils.writePascalString(this, this.mTitle, 29);
        }
        return super.getBytes();
    }
}
